﻿package net.area80.sitemanager.events
{
	import flash.events.Event;
	
	/**
	* LoaderClipEvent
	* @author 	Wissarut Pimanmassuriya
	*/
	public class LoaderClipEvent extends Event
	{
		/**
		 * Invoke when Loader found all files added to load.
		 */
		public static const ALLINIT:String = "allinit";
		public static const PROGRESS:String = "progress";
		/**
		 * Invoke whem all files has been loaded completly
		 */
		public static const COMPLETED:String = "completed";
		
		public var progressRatio:Number = 0;
		public var currentSize:Number = 0;
		public var totalSize:Number = 0;
		
		public function LoaderClipEvent (type:String, currentSize:Number,totalSize:Number):void {
			this.currentSize = currentSize;
			this.totalSize = totalSize;
			this.progressRatio = currentSize / totalSize;
			super(type);
		}
	}
	
}